//
//  Base_loadXibView.m
//  ArtMedia
//
//  Created by 智障 on 2018/10/9.
//  Copyright © 2018年 程明. All rights reserved.
//

#import "Base_loadXibView.h"

@implementation Base_loadXibView

+ (id)loadFromXib:(NSString *)xib withCls:(__unsafe_unretained Class)cls {
    NSArray* array = [[NSBundle mainBundle] loadNibNamed:xib owner:nil options:nil];
    if (array && array.count > 0) {
        for (id obj in array) {
            if ([obj isKindOfClass:cls]) {
                return obj;
            }
        }
    }
    return nil;
}
@end
